package com.cms.setting.nav.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cms.setting.nav.dao.NavInfoDAO;
import com.cms.setting.nav.pojo.NavInfo;
import com.cms.setting.nav.service.NavInfoService;
@Service
public class NavInfoServiceImpl implements NavInfoService {
	@Autowired
	NavInfoDAO navInfoDAO;
	@Override
	public boolean saveNavInfo(NavInfo navInfo) {
		if(navInfo.getId()==null){
			return navInfoDAO.insert(navInfo)>0;
		}else{
			return navInfoDAO.updateByPrimaryKey(navInfo)>0;
		}
	}

	@Override
	public boolean deleteById(Integer id) {
		return navInfoDAO.deleteByPrimaryKey(id)>0;
	}

	@Override
	public NavInfo findById(Integer id) {
		return navInfoDAO.selectByPrimaryKey(id);
	}

	@Override
	public List<NavInfo> findList() {
		// TODO Auto-generated method stub
		return null;
	}

}
